﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace DO.Domain.Repositories
{
    public interface IRepositoryLocator
    {
        #region CRUD operations

        TEntity Save<TEntity>(TEntity instance);
        void Update<TEntity>(TEntity instance);
        void Delete<TEntity>(TEntity instance);

        #endregion

        #region Retrieval Operations

        TEntity GetByIdentity<TEntity>(long identity);
        IQueryable<TEntity> FindAll<TEntity>();

        #endregion

        IRepository<T> GetRepository<T>();
    }
}
